package com.xiaohujr.xuexue;

/**
 * Hello world!
 */
public class App {

    public static int f(int a) {
        if (a == 1) {
            return 1;
        }
        if (a == 2) {
            return 2;
        }
        if (a == 3) {
            return 4;
        }
        if (a == 4) {
            return 8;
        }
        return f(a - 1) + f(a - 2) + f(a - 3) + f(a - 4);
    }

    public static void main(String[] args) {
        System.out.println(f(10));
    }
}
